<!DOCTYPE html>
<html lang="en">
	<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<title>hitTestPoint</title>
	<script type="text/javascript" src="../load_lufylegend.js"></script>
	</head>
	<body>
			<div id="legend">
				
			</div>
<script>
var backLayer;
var title;
LInit(20,"legend",800,450,main);
function main(){
	LGlobal.setDebug(true);
	backLayer = new LSprite();
	addChild(backLayer);
	backLayer.addEventListener(LEvent.ENTER_FRAME,onframe);
	title = new LTextField();
	title.size = 18;
	title.x = 10;
	title.y = 5;
	title.text = "hitTestPoint:false";
	addChild(title);
	
	var layer = new LSprite();
	layer.x = 20;
	layer.y = 50;
	layer.graphics.drawRect(0,"#880088",[0,0,100,40],true,"#880088");
	layer.addShape(LShape.RECT,[0,0,100,40]);
	backLayer.addChild(layer);
	
	layer = new LSprite();
	layer.x = 200;
	layer.y = 100;
	layer.graphics.drawArc(0,"#880088",[0,0,30,0,2*Math.PI],true,"#880088");
	layer.addShape(LShape.ARC,[0,0,30]);
	backLayer.addChild(layer);
	
	layer = new LSprite();
	layer.x = 120;
	layer.y = 150;
	layer.graphics.drawVertices(0,"#880088",[[10,10],[50,100],[100,70]],true,"#880088");
	layer.addShape(LShape.VERTICES,[[10,10],[50,100],[100,70]]);
	backLayer.addChild(layer);
}
function onframe(e){
	for(var i=0;i<backLayer.childList.length;i++){
		if(backLayer.childList[i].hitTestPoint(mouseX,mouseY)){
			title.text = "hitTestPoint:true";
			return;
		}
	}
	title.text = "hitTestPoint:false";
}
</script>
	</body>
</html>
